﻿using System;
using System.ServiceModel;
using ExplorerService.Common.DataContracts;

namespace ExplorerService.Common.ServiceContracts
{
    /// <summary>
    /// Service used by applications to register for session
    /// </summary>
    [ServiceContract]
    public interface IApplicationSessionService
    {
        /// <summary>
        /// Registers a new application session based on the provided information
        /// </summary>
        /// <param name="information">The application information</param>
        /// <returns>The session token for the application. Guid.Empty if register failed</returns>
        [OperationContract]
        Guid GetApplicationSessionId(ApplicationInformation information);

        /// <summary>
        /// Lets the service know that this session is still alive
        /// </summary>
        /// <param name="applicationSessionId">The session ID for the application</param>
        [OperationContract]
        bool Hearbeat(Guid applicationSessionId);
    }
}
